package year2019.month08;

/**
 * 二叉树
 */
public class TreeNode {
    private String data;
    private TreeNode leftNode;
    private TreeNode rightNode;

    public TreeNode(){}
    public TreeNode(String data){
        this.data = data;
    }
    public TreeNode(String data, TreeNode leftNode, TreeNode rightNode){
        this.data = data;
        this.leftNode = leftNode;
        this.rightNode = rightNode;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public TreeNode getLeftNode() {
        return leftNode;
    }

    public void setLeftNode(TreeNode leftNode) {
        this.leftNode = leftNode;
    }

    public TreeNode getRightNode() {
        return rightNode;
    }

    public void setRightNode(TreeNode rightNode) {
        this.rightNode = rightNode;
    }
}
